/**
 * 
 */
package edu.cornell.cs.lsi.mapreduce.pass2;

/**
 * @author poornima
 *
 */
public class Point {
	
	private Double x;
	private Double y;
	
	public Point(){
		
	}
	
	public Point(double x, double y){
		this.x = x;
		this.y = y;
	}
	
	public Double getX() {
		return x;
	}
	public void setX(Double x) {
		this.x = x;
	}
	public Double getY() {
		return y;
	}
	public void setY(Double y) {
		this.y = y;
	}
	
	public boolean equals(Object spec){
		if(spec == null){
			return false;
		}
		if(spec instanceof Point){
			Point pt = (Point)spec;
			if(this.x.equals(pt.getX()) && this.y.equals(pt.getY())){
				return true;
			}
		}
		return false;
	}
	
	public int hashCode(){		
			return (this.x.hashCode() ^ this.y.hashCode());				
	}
}
